const lark = require("@larksuiteoapi/node-sdk");
var axios = require("axios");


//更改对应的app_id
const FEISHU_APP_ID = "cli_a5353776bba9100d";
const FEISHU_APP_SECRET = "nSNp3X7T6NWgP7kkY3Rt9dGJpfjBbPcR";


const client = new lark.Client({
    appId: FEISHU_APP_ID,
    appSecret: FEISHU_APP_SECRET,
    disableTokenCache: false,
    appType: lark.AppType.SelfBuild,
    domain: lark.Domain.Feishu,
});


console.log("---------start");

//https://open.feishu.cn/document/server-docs/im-v1/message-card/delete-message-cards-that-are-only-visible-to-certain-people

//发送对特定人可见的卡片
async function executeAsyncFunction001() {
    try {
        //const result = await reply("om_3066a55cff402d0772511a53410f10c7", "我是reply消息")
        const result = await client.request({
            method: "POST",
            url: '/open-apis/ephemeral/v1/delete',
            data: {
                message_id: "om_4f6d4428410aa2ccbae5b8aed84a061b",
            }
        });
        console.log(result); // 输出 'Hello World'
    } catch (error) {
        console.error(error);
    }
}

executeAsyncFunction001()
console.log("---------end");
